Extract vm images #16 - #20
Conversation
Update boilerplate
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Steven Esser <sesser@nexb.com>
Fix .gitattributes
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
With this all supported archive formats with be tried. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
THis is a two step extraction using libguestfs to get a FS to a tarball which is then extractcode normally (hence dealing with links, device files and other permission oddities as a side effect). We support VDI (VirtualBox, VMDK (VMware) and QCOW2 (QEMU) Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Use virtualenv-embedded libraries
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
This will work even from a git archive or when git is not installed. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
This was they do not end up in the template CHANGELOG.rst Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
We now load native libraries and executables from: 1. an envt. variable path 2. OR a locatin provider plugin 3. OR the PATH or we fail Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
New configure
Reuse variables. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
We are not extracting symlinks, though it could be useful in the future for some cases. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
From aboutcode-org/typecode#20 Reported-by: Pierre Tardy <pierre.tardy@renault.com> Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Also support Python 3.9 Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
And remove v prefix from fallback version Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Apply formatting and minor refactoring. Refine and carify documentation. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
|
All clear. Now merging for release. |
|
A few comments about the patch in no particular order: Instead of using guestfish it may or may not be worth considering using the API directly. We have a solid Python binding that covers the entire API. Example: https://libguestfs.org/guestfs-python.3.html#example-2:-inspect-a-virtual-machine-disk-image For extracting things like partitions from disk images (ie. without processing the filesystem or individual files), we have the lighter weight tooling of libnbd / nbdkit (https://gitlab.com/nbdkit) / qemu-nbd. For example to copy out a partition from a raw disk image (to stdout), you might use: https://libguestfs.org/nbdkit-partition-filter.1.html#EXAMPLE To copy out a partition from a qcow2 file (again to stdout): https://libguestfs.org/nbdkit-nbd-plugin.1.html#Add-nbdkit-partition-filter-to-qemu-nbd |
|
@rwmjones thank you ++ for chiming in! You wrote:
I considered it at first but then the uneven packaging and support for various Python versions across Linux distros made switch back to a CLI interface for now.
I looked at it in details too. The partitions are not enough and I would need to mound things afterwards otherwise. On a side note, I have been hit by https://bugs.launchpad.net/ubuntu/+source/libguestfs/+bug/1813662 and I posted there https://bugs.launchpad.net/ubuntu/+source/libguestfs/+bug/1813662/comments/25 ;) |
This PR: